Kill gpg agent in package-test.el to avoid a race
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 22:35:56 +0000 (17:35 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 9 Nov 2025 19:50:49 +0000 (13:50 -0600)
commit671d57a0af7bc24f0189cd91456a55c2b05f5866
tree70a4f91c9cc14a32fa7bd8c3fae8e4918d042a10
parent6d66874686f44e5e6d929c1cfa7a508caeac2ab9
Kill gpg agent in package-test.el to avoid a race

package-test.el should no longer fail during clean up.

* Previously a delete-directories call raced with the gpg agent's own
  cleanup process (presumably triggered by the first deletion of one of
  the agent's sockets).  As a result, it looks like the agent might
  delete one of its sockets after delete-directories had decided to
  delete the socket, but before it made the attempt, causing an
  exception.

* To fix the problem, explicitly ask gpg-connect-agent to kill the agent
  before attempting to delete the gnupg home directory, and then delete
  via "rm -rf" to ignore any vanishing files.
test/lisp/emacs-lisp/package-tests.el